package com.example.houqin_oa.controller;

import com.example.comment_oa.pojos.ReplaceRecord;
import com.example.comment_oa.response.AjaxResponse;
import com.example.houqin_oa.service.ReplaceRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description:更换
 * @Author:陈旭良
 * @Documents_And_Settings:liang
 * @Date:2022/10/17 18:48
 * @Entry_Name:my_springcloud_project01cangku
 */
@RestController
@CrossOrigin
@RequestMapping("/houqinOa")
public class ReplaceController {

    @Autowired
    ReplaceRecordService replaceRecordService;

    @PostMapping("/Replace/AllReplace")
    public AjaxResponse AllReplace(@RequestBody ReplaceRecord replaceRecord){
        return AjaxResponse.success(replaceRecordService.AllReplace(replaceRecord));
    }

    @PostMapping("/Replace/Change")
    public AjaxResponse Change(@RequestBody ReplaceRecord replaceRecord){
        return AjaxResponse.success(replaceRecordService.Change(replaceRecord));
    }

    @PostMapping("/Replace/RenewalApply")
    public AjaxResponse RenewalApply(@RequestBody ReplaceRecord replaceRecord){
        return AjaxResponse.success(replaceRecordService.RenewalApply(replaceRecord));
    }
    @PostMapping("/Replace/Renewal")
    public AjaxResponse Renewal(@RequestBody ReplaceRecord replaceRecord){
        return AjaxResponse.success(replaceRecordService.Renewal(replaceRecord));
    }

}
